package com.gxc.config;

import com.gxc.controller.TestServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * WebMvcConfigBean.
 *
 * @author 宫新程
 * @since 2018/12/18 6:18 PM
 */
@Configuration
public class WebMvcConfigBean implements WebMvcConfigurer {

  @Bean
  public ServletRegistrationBean<TestServlet> TestServletRegist() {
    return new ServletRegistrationBean<>(new TestServlet(), "/servlet/test");
  }

}
